home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 3.iso
/
bin
/
stopOKServer
< prev
next >
Wrap
Text File
|
1996-11-11
|
991b
|
56 lines
#!/bin/csh -f
#
# update path to also look in the same directory from
# where this script was executed from
#
set path = (/usr/bsd /bin /usr/bin /usr/sbin /usr/bin/X11)
set DT_xconfirm = "$DT_utilities/DT_xconfirm"
set path = (${DT_util_path} $path)
# make sure CDROM_ROOT envariable is set
if (! $?CDROM_ROOT) then
$DT_xconfirm notviewDT
exit 0
endif
#
# find out and remember the user name
#
if ($?HOME) then
set userHome = $HOME
else
$DT_xconfirm nohome
exit 0
endif
#
# get the port number on which the ok server is running
# from a stored file
#
if ( -e $userHome/$DT_WWW_ROOT/logs/oksrv.port ) then
set sockPort = `cat $userHome/$DT_WWW_ROOT/logs/oksrv.port`
else
$DT_xconfirm error "Could not determine the port number of dt_oksvr (Search Server)\
Cannot stop it."
exit 0
endif
setenv OKSVR_PORT $sockPort
#
# stop ok server
#
okserver stop
#
# clean this file on the way out
#
/usr/bin/rm $userHome/$DT_WWW_ROOT/logs/oksrv.port
exit 1